<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@ taglib prefix="s" uri="/struts-tags"%>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";

Calendar c = Calendar.getInstance();
String year = String.valueOf(c.get(Calendar.YEAR));
String month = String.valueOf(c.get(Calendar.MONTH)+1);
String hour = String.valueOf(c.get(Calendar.HOUR));
String day = String.valueOf(c.get(Calendar.DAY_OF_MONTH));
int am_pm = c.get(Calendar.AM_PM);
String minute = String.valueOf(c.get(Calendar.MINUTE));

%>
<%
if(session.getAttribute("account") == null){
	response.sendRedirect("index.jsp");
}
%>
<!DOCTYPE html> 
<html><!-- InstanceBegin template="/Templates/pageCreate.dwt" codeOutsideHTMLIsLocked="false" -->
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, minimum-scale=1, maximum-scale=1">
<title>个人信息管理系统</title>

<link href="jquery-mobile/jquery.mobile-1.0.min.css" rel="stylesheet" type="text/css" />
<script src="jquery-mobile/jquery-1.6.min.js"></script>
<script src="jquery-mobile/jquery.mobile-1.0.min.js"></script>
<!-- InstanceBeginEditable name="head" -->

<!-- InstanceEndEditable -->
</head> 
<body> 

<div data-role="page" >
	<div data-role="header">
	
	<!-- InstanceBeginEditable name="header" -->
		<h1>新建约会</h1>
        <!-- InstanceEndEditable -->
        <a href="logoff" data-role="button"  class="ui-btn-right">
    注销
    </a>
        <div data-role="navbar">
        	<ul>
            <li><a href="dayAtAGlanceAction" id="main">一日行程</a></li>
            <li><a href="noteList" id="notes">便签</a></li>
            <li><a href="taskList" id="tasks">任务</a></li>
            <li><a href="contactList" id="contacts">联系</a></li>
            <li><a href="appointmentList" id="appointments">约会</a></li>
            </ul>
        </div>
	</div>
	<!-- InstanceBeginEditable name="content" -->
	<div data-role="content">	
	  <div id="appointmenteditform">
      <form id="appointmentCreateForm" method="post" action="appointmentCreate">
        <p id="subject"><span>主题：</span>
          <input id="subject"type="text" name="appointment.subject" />
        </p>
        <p id="address"><span>地点：</span>
          <input id="address"type="text" name="appointment.location" />
        </p>
        <input id="ad" type="hidden" name="appointment.appointmentDate"/>
        <input id="st" type="hidden" name="appointment.startTime"/>
        <input id="et" type="hidden" name="appointment.endTime"/>
        <p id="time"><span>时间：</span>
        <fieldset data-role="controlgroup" data-type="horizontal">
          <select id="dueMonth"  name="dueMonth">
           <option value="<%=month%>"><%=month%></option>
            <option value="01">一月</option>
            <option value="02">二月</option>
            <option value="03">三月</option>
            <option value="04">四月</option>
            <option value="05">五月</option>
            <option value="06">六月</option>
            <option value="07">七月</option>
            <option value="08">八月</option>
            <option value="09">九月</option>
            <option value="10">十月</option>
            <option value="11">十一月</option>
            <option value="12">十二月</option>
          </select>
          <select id="dueDay" name="dueDay">
          <option value="<%=day%>"><%=day%></option>
            <option value="01">01</option>
            <option value="02">02</option>
            <option value="03">03</option>
            <option value="04">04</option>
            <option value="05">05</option>
            <option value="06">06</option>
            <option value="07">07</option>
            <option value="08">08</option>
            <option value="09">09</option>
            <option value="10">10</option>
            <option value="11">11</option>
            <option value="12">12</option>
            <option value="13">13</option>
            <option value="14">14</option>
            <option value="15">15</option>
            <option value="16">16</option>
            <option value="17">17</option>
            <option value="18">18</option>
            <option value="19">19</option>
            <option value="20">20</option>
            <option value="21">21</option>
            <option value="22">22</option>
            <option value="23">23</option>
            <option value="24">24</option>
            <option value="25">25</option>
            <option value="26">26</option>
            <option value="27">27</option>
            <option value="28">28</option>
            <option value="29">29</option>
            <option value="30">30</option>
            <option value="31">31</option>
          </select>
          <select id="dueYear"name="dueYear">
          <option value="<%=year%>"><%=year%></option>
            <option value="2006">2006</option>
            <option value="2007">2007</option>
            <option value="2008">2008</option>
            <option value="2009">2009</option>
            <option value="2010">2010</option>
            <option value="2011">2011</option>
            <option value="2012">2012</option>
            <option value="2013">2013</option>
            <option value="2014">2014</option>
            <option value="2015">2015</option>
            <option value="2016">2016</option>
            <option value="2017">2017</option>
            <option value="2018">2018</option>
            <option value="2019">2019</option>
            <option value="2020">2020</option>
          </select>
          </p>
        </fieldset>
        <p id="starttime"> <span>开始时间：</span>
        
        <div data-role="fieldcontain">
            
          <input type="range" name="hour" id="stHour" value="<%=hour%>"
          min="0" max="12"
          />
          <label for="stHour">小时</label>
         </div> 
          <div data-role="fieldcontain">
          <input type="range" name="minute" id="stMinute" value="<%=minute%>"
          min="0" max="60"
          />
           <label for="stMinute">分钟</label>
           </div> 
        <fieldset data-role="controlgroup" data-type="horizontal">
    
          <select id="stAP"  name="AP">
          <%
		  	if(am_pm == 0){
		  %>
            <option value="AM">AM</option>
           <%}else{%> 
            <option value="PM">PM</option>
            <%}%>
          </select>
          </p>
        </fieldset>
        <p id="endtime"> <span>结束时间：</span>
     
              <div data-role="fieldcontain">
            
          <input type="range" name="hour" id="endHour" value="12"
          min="0" max="12"
          />
          <label for="endHour">小时</label>
         </div> 
          <div data-role="fieldcontain">
          <input type="range" name="minute" id="endMinute" value="12"
          min="0" max="60"
          />
           <label for="endMinute">分钟</label>
           </div>
             <fieldset data-role="controlgroup" data-type="horizontal">
          <select id="endAP"  name="AP">
            <option value="AM">AM</option>
            <option value="PM">PM</option>
          </select>
          </p>
        </fieldset>
        <p id="comment"><span>　　内容：</span>
          <textarea id="contents"  name="appointment.comments"></textarea>
        </p>
        	<button id="appointCreate" type="button" data-icon="plus" data-iconpos="top" value="确认"></button>
      </form>
    </div>
        	
	</div>
    <!-- InstanceEndEditable -->
	<!-- InstanceBeginEditable name="footer" -->
	<div data-role="footer"  align="center">
		<script src="jquery-mobile/jqm-custom.js" type="text/javascript"></script>
	</div>
    <!-- InstanceEndEditable -->
</div>
<!-- InstanceBeginEditable name="endLoad" -->
<script type="text/javascript">

</script>
<!-- InstanceEndEditable -->
</body>
<!-- InstanceEnd --></html>
